<template>
  <van-swipe class="home-banner" :autoplay="3000" indicator-color="white">
    <van-swipe-item v-for="(img, idx) in banners" :key="idx">
      <img :src="img" class="banner-img" />
    </van-swipe-item>
  </van-swipe>
</template>

<script setup>
defineProps({
  banners: {
    type: Array,
    required: true
  }
})
</script>

<style scoped lang="less">
.home-banner {
  .banner-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
  }
}
</style> 